<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>全部考试</title>
<link rel="stylesheet" type="text/css" href="css/lib/swiper.min.css"/>
<link rel="stylesheet" type="text/css" href="css/lib/doumee.css"/>
<link rel="stylesheet" type="text/css" href="css/lib/dialog.css"/>
<link rel="stylesheet" type="text/css" href="css/exanIndex.css"/>
<script src="js/lib/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/vue-2.5.17.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/doumee.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/dialog.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>

<div v-cloak id="zbom">

	<header class="header">
		<a class="left_icon back_btn"></a>
		<h4 class="title">全部考试</h4>
	</header>
	
	<div class="swiper-container Main" id="Main">
		<div class="swiper-wrapper">
			<div class="swiper-slide content">
				
				<div class="children" id="examIndex">
					
					<div class="lessonMod bg-w bottom-line">
						<ol class="lessonBox flex-row bottom-line" v-for="(item,index) in examData" :data-type="item.statu" @click="skipDtl(item.id)">
							<li class="photo">
								<img :src="item.photo" />
							</li>
							<li class="info flex-full">
								<h5 class="name dm-wrap">{{item.name}}</h5>
								<h5 class="classifyMod">
									{{item.classify}}
									<span class="type">{{item.type}}</span>
								</h5>
								<h5 class="exMod dm-clearfix">
									<div class="num dm-left">
										{{item.startTime}}
									</div>
									<div class="total h6 dm-wrap dm-right">
										<span class="unachieve" v-if="item.statu == 0">未报名</span>
										<span class="achieved" v-else-if="item.statu == 1">已报名</span>
										<span class="achieved" v-else>已结束</span>
									</div>
								</h5>
							</li>
						</ol>
					</div>
					
				</div>
				
			</div>
		</div>
	</div>
	
</div>


<!--引入模拟数据-->
<script src="data/examData.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

var vm = new Vue({
	el:"#zbom",
	data:{
		swiper:null,
	 	examData:[],
	},
	methods:{
		//获取数据
		getLesson:function(){
			this.examData =  examData;
		},
		//跳转详情
		skipDtl:function(id){
			location.href = 'exam_dtl.html?id='+id;
		},
	},
	mounted:function(){
		var that = this;
		this.swiper = pullSwiper('#Main',{
			up:true,
			down:true,
		});
		pullSwiper('#subMain');
		this.getLesson();
	}
});


//刷新数据
function refresh(pull){
	pull.innerText = '刷新成功';
};

//加载数据
function reload(pull){
	pull.innerText = '已加载全部数据'
};

</script>

</body>
</html>
